/*****************************************************************************
 * Copyright (C) Stacy Curl. All rights reserved.                            *
 * ------------------------------------------------------------------------- *
 * The software in this package is published under the terms of the BSD      *
 * style license a copy of which has been included with this distribution in *
 * the LICENSE.txt file.                                                     *
 *****************************************************************************/
package picounit.features.verify;

import picounit.verify.ReasonCapturer;
import picounit.verify.constraint.ShortConstraint;

public class ExtensibleShortConstraints
	extends NumberConstraints {

	public ExtensibleShortConstraints(Evaluator evaluator) {
		super(evaluator);
	}
	
	public ReasonCapturer isEqualTo(short equalTo) {
		return passes(constraintFactory.equalTo(new Short(equalTo), modifier(), stringer()));
	}

	public ReasonCapturer isDifferentTo(short differentTo) {
		return passes(constraintFactory.differentTo(new Short(differentTo), modifier(),
			stringer()));
	}

	public ReasonCapturer isGreaterThan(short greaterThan) {
		return passes(constraintFactory.greaterThan(new Short(greaterThan), modifier()));
	}

	public ReasonCapturer isGreaterThanOrEqualTo(short greaterThanOrEqualTo) {
		return passes(constraintFactory.greaterThanOrEqualTo(new Short(greaterThanOrEqualTo),
			modifier()));
	}

	public ReasonCapturer isLessThan(short lessThan) {
		return passes(constraintFactory.lessThan(new Short(lessThan), modifier()));
	}

	public ReasonCapturer isLessThanOrEqualTo(short lessThanOrEqualTo) {
		return passes(constraintFactory.lessThanOrEqualTo(new Short(lessThanOrEqualTo),
			modifier()));
	}

	public ReasonCapturer passes(ShortConstraint shortConstraint) {
		return passes(createDelegate(short.class, shortConstraint));
	}
}
